is not strictly a
Type
operator
Summary
Evaluates to true if the actual type of value is not the specified type.
Syntax
<value> is not strictly { nothing | a boolean | a number | an integer | a real | a string | a name | a binary string | an array }
Description
Use the is not strictly a operator to determine what the true type of a value is not. The true type of a value is the representation which the engine is currently holding for it, without performing any implicit type coercion. The true type of a value can be one of the following:
- nothing: no value, typically seen as empty
- boolean: either true or false, typically seen as the result of a comparison operator
- number: a numeric value
- integer: a numeric value internally represented as an integer value
- real: a numeric value internally represented as a floating-point value
- string: a piece of text (sequence of characters)
- name: a string used as an array key or literal
- binary string: a sequence of bytes
- array: an associative array
The is not strictly a operator differs from is not a in that it does
not perform any type coercion. For example, x not is a number
would return false only when x
holds neither a number nor holds a string
which can be parsed as a number; whereas x is not strictly an number
only returns false if x
does not currently hold a number.
Whether a numeric value is not strictly an integer
, or
not strictly a real
will depend on how it was generated. In particular, being
not strictly an integer
does not mean the value has a fractional part.
Parameters
Name | Type | Description |
---|---|---|
value | The expression which will be tested for its type. |
Examples
"Hello World!" is not strictly a string -- evaluates to false
1 + 200 is not strictly an number -- evaluates to false
(100 is 100) is not strictly a boolean -- evaluates to false
the compress of "Hello World!" is not strictly a binary string -- evaluates to false
Related
operator: is strictly a, is a, is not a, as a
Compatibility and Support
Introduced
LiveCode 8.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile